package com.cc.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cc.mapper.CustomerMapper;
import com.cc.model.Customer;
import com.cc.model.CustomerExample;
import com.cc.service.ICustomerService;
import com.github.pagehelper.PageHelper;

@Service
public class CustomerServiceImpl implements ICustomerService {

    @Autowired
    private CustomerMapper customerMapper;
    @Override
    public List<Customer> list(int page, int limit) {
        CustomerExample example = new CustomerExample();
        example.setOrderByClause("cust_Level asc");
        PageHelper.startPage(page,limit);
        return customerMapper.selectByExample(example );
    }

}
